<?php 
  // Include Lib path
  set_include_path('/home/servers/labs.geeek.org/lib/' . PATH_SEPARATOR . get_include_path());

  // this defines some of your basic setup
  include_once 'config.php';

  // Facebook API
  include_once 'facebook-platform/php/facebook.php';
 
  $facebook = new Facebook($facebook_api_key, $facebook_secret);
  $facebook->require_frame();

  $is_tab = isset($_POST['fb_sig_in_profile_tab']);

  if( !$is_tab ){
	$facebook_uid = $facebook->require_login(); 
  } else {
         $facebook_uid = $facebook->get_profile_user();
  }

?>

<fb:fbml>
<h1>Mappy Latitude</h1>
<br/>
<fb:tabs>
  <fb:tab-item href='index.php' title='Map' selected='true'/>
  <fb:tab-item href='settings.php' title='Paramètres' />
</fb:tabs>

<fb:iframe src='http://labs.geeek.org/mappy/map.php?facebook_uid=<?php echo $facebook_uid ?>' width="100%" height="800px" scrolling="no" frameborder="0" />

<fb:bookmark />

<fb:google-analytics uacct="UA-605163-22" />

</fb:fbml>
